package com.losdun.aftersales.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description
 * @Author Sword.Ye
 * @Date 2025/9/12
 **/
@Getter
@AllArgsConstructor
public enum AftersalesTypeEnum {

        MEASURE(0, "测量"),
        INSTALL(1, "安装"),
        DEBUG(2, "调试"),
        MAINTAIN(3, "保养"),
        REPAIR(4, "售后");

        private Integer value;
        private String label;

        public static boolean isInstall(Integer value){
                if(INSTALL.value.equals( value) || MEASURE.value.equals( value) || DEBUG.value.equals( value)){
                        return true;
                }
                return false;
        }

        public static String getLabelByValue(Integer value){
                for (AftersalesTypeEnum typeEnum : AftersalesTypeEnum.values()) {
                        if(typeEnum.value.equals(value)){
                                return typeEnum.label;
                        }
                }
                return "";
        }

}
